package cn.hd01.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import cn.hd01.repository.ProvincesRepository;
import cn.hd01.repository.entity.Provinces;
import cn.hd01.service.ProvincesService;

@Service
public class ProvincesServiceImpl extends BaseServiceImpl<Provinces, Integer> implements ProvincesService {

	private ProvincesRepository repository;

	@Autowired
	public ProvincesServiceImpl(ProvincesRepository repository) {
		super(repository);
		this.repository = repository;
	}
	
	@Override
	@Cacheable(value="provincesCache")
	public List<Provinces> findAll(){
		return repository.findAll();
	}
}
